package com.chencs.app.model.service;

import com.alibaba.fastjson.JSON;
import com.chencs.vo.biz.model.ModeModel;
import com.chencs.vo.net.request.RequestBase;
import com.chencs.vo.net.response.AdverResponse;
import com.chencs.vo.net.response.GuideResponse;
import com.chencs.vo.net.response.ModelResponse;
import com.chencs.webmvc.rest.RestFullTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * Created by Administrator on 2017/10/10.
 */
@Service
public class AppModelService {


    @Autowired
    RestFullTemplate restTemplate;
    private static final String URLPATH = "service-common/app/index/";


    /**
     * 获取首页轮播广告
     * @return
     */
    public String slideAdver(@RequestBody RequestBase requestBase){
        String ret = restTemplate.postForObject(URLPATH + "slideAdver", String.class,requestBase);
        return ret;
    }


    /**
     * 导购模块
     * @return
     */
    public String guide(@RequestBody RequestBase requestBase){
        String ret = restTemplate.postForObject(URLPATH + "guide", String.class,requestBase);
        return ret;
    }

    /**
     * 导购模块2
     * @return
     */
    public String guideImage(@RequestBody RequestBase requestBase){
        String ret = restTemplate.postForObject(URLPATH + "guideImage", String.class,requestBase);
        return ret;
    }

    /**
     * 获取欢迎界面广告图
     * @return
     */
    public String getWelcomeAd(@RequestBody RequestBase requestBase){
        String ret = restTemplate.postForObject(URLPATH + "getWelcomeAd", String.class,requestBase);
        return ret;
    }

    /**
     * 获取弹窗广告AD
     * @return
     */
    public String getPopupAd(@RequestBody RequestBase requestBase){
        String ret = restTemplate.postForObject(URLPATH + "getPopupAd", String.class,requestBase);
        return ret;
    }

}
